YNQ  YNQ-1.5.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Codepage

Data Structures

struct  CMCodepage
 

Functions

NQ_BOOL cmCodepageAdd (const CMCodepage *codePage)
 
NQ_BOOL cmCodepageRemove (const CMCodepage *codePage)
 
void cmWideCharToMultiByte (NQ_CHAR *strMultiByte, const NQ_WCHAR *strWideChar)
 
void cmMultiByteToWideChar (NQ_WCHAR *strWideChar, const NQ_CHAR *strMultiByte)
 

Detailed Description

Function Documentation

NQ_BOOL cmCodepageAdd ( const CMCodepage codePage)

This function installs code page for another language.

Code page is identified by the 'id' value of its descriptor. Duplicate installation overwrite the previous one.

Once successfully installed, the code page becomes available by its 'id' number through the udGetCodePage() function call.

This function may be used for one the following purposes:

  • Installing new code page.
  • Replacing one of previously installed code pages.
  • Replacing one of precompiled code pages.
    Parameters
    codePagePointer to codepage descriptor
    Returns
    NQ_TRUE on success and NQ_FALSE on error. Application may analyze error reason by reading the last system error. It may be NQ_ERR_NOMEM on codepage table overflow.
NQ_BOOL cmCodepageRemove ( const CMCodepage codePage)

This function removes code page.

This call will either remove a code page previously installed by calling cmCodepageAdd() or it may remove a a pre-compiled page.

Parameters
codePagePointer to codepage descriptor as CMCodepage structure. NQ uses only the 'id' field and ignores others.
Returns
NQ_TRUE on success and NQ_FALSE on error. Application may analyze error reason by reading the last system error. It may be NQ_ERR_NOTFOUND when this codepage does not exist.
void cmWideCharToMultiByte ( NQ_CHAR strMultiByte,
const NQ_WCHAR strWideChar 
)

Conversion of Wide Characters string into Multi Byte.

Parameters
strMultiBytePointer to result multi byte string
strWideCharPointer to wide char string to convert
void cmMultiByteToWideChar ( NQ_WCHAR strWideChar,
const NQ_CHAR strMultiByte 
)

Conversion of Multi Byte string into Wide Characters.

Parameters
strWideCharPointer to result wide char string
strMultiBytePointer to multi byte string to convert